{% extends 'base.html' %}
{% block title %}登录{% endblock %}
{% block article %}
<!-- 表单内容 -->
<div class="col-sm-offset-4 col-sm-4" style="margin-top: 50px;">
    <form class="form-horizontal" role="form" action="{% url 'user_login' %}" method="post">
     {% csrf_token %}
        <!-- 如果账号或密码错误，输出提示 -->
        {% if login_message %}

        <h3 class="text-danger">{{ login_message }}</h3>
        {% endif %}
        <div class="form-group">
            <label for="username" class="col-sm-2 control-label">用户名</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="username" placeholder="请输入账号" name="account">
            </div>
        </div>
        <div class="form-group">
            <label for="password" class="col-sm-2 control-label">密码</label>
            <div class="col-sm-10">
                <input type="password" class="form-control" id="password" placeholder="请输入密码" name="password">
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-default">登录</button>
            </div>
        </div>
    </form>
</div>
{% endblock %}